package com.luct.customview;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.TextView;

import com.github.ybq.android.spinkit.style.Circle;
import com.github.ybq.android.spinkit.style.Wave;

public class LoadingActivity extends Activity {
	private Circle mCircleDrawable;
    private Wave mWaveDrawable;
    private TextView textView1, textView2;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_loading);
		textView1 = (TextView) findViewById(R.id.circle);
        mCircleDrawable = new Circle();
        mCircleDrawable.setBounds(0, 0, 200, 200);
        mCircleDrawable.setColor(Color.RED);
        textView1.setCompoundDrawables(null, mCircleDrawable, null, null);
        textView1.setBackgroundColor(0xff00ff00);
        mCircleDrawable.start();

        textView2 = (TextView) findViewById(R.id.wave);
        mWaveDrawable = new Wave();
        mWaveDrawable.setBounds(0, 0, 100, 100);
        mWaveDrawable.setColor(Color.WHITE);
        textView2.setCompoundDrawables(null, mWaveDrawable, null, null);
        textView2.setBackgroundColor(0xff00ff00);
        mWaveDrawable.start();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        mCircleDrawable.stop();
        mWaveDrawable.stop();
    }

}
